Reading Complexity Index
Info
The goal of this program was to test my knowledge on using strings and reading files. We were allowed to use either the string class or C-Strings. A C-String is an array of chars that ends with the null character '\0'. I decided to go with the built in string class because it is easier to work with getline() and just user input in general. The Reading Complexity Index program is designed to take a piece of text, whether it be written in the console or in a text file, and give it an index based on how hard it was to read. The index formula I used was the Flescher Reading Ease Formula which is based on syllables, setence count, and word count. Here is the full formula:

As seen from the formula, the lower the index, the harder the text is to read. I have three code files for this project: A library for working with things related to the index which includes a header and body and driver file to test the library. For more information on the assignment, check out my instructor's site.
Code
Indexer.h

Header
The header file is a good place to give a summary of all the parts of the program. First we have the constructor and the copy constructor. They give a default value to the variables seen in the private section. Index will be where we store the index value given to the sentence. sylCount, sentCount, and wordCount are tracker variables where we store the total amount of syllables, sentences, and words respectively. Finally, text is the string which will hold the text to be indexed.
Now, let's talk about the methods. calcIndex() will be where we calculate the index of console input. First, getText() must be called in order to put a string in text. This is because we will use calcIndexFile() for putting a file into the text string and then call calcIndex() inside of that method to calculate the index. getTextNoHtml() takes console input and removes anything within angel brackets in an attempt to remove html tags. getIndex() returns the index calculated. If nothing was ever calculated, the default value is -1, hopefully notifying the user that something is wrong. testMethod() is for testing purposes and returns syllable, word, and sentence count along with the index. Finally, checkVowel() checks if the character passed to the method is a vowel or not.
Indexer.cpp

Includes
First of all, let's go over our includes. Indexer.h is our header file that says what is going to be included inside the body, which is what we are looking at right now. Iostream is for asking the user for text input which we handle inside the library. String is because we are using the string class to store our text values. sstream is for using stringstreams during the file reading portion. We'll get more into that when we reach that part of the program. Limits is because I needed to clear the buffer at one point of the program and I use cin.ignore with the streamsize limit. fstream is for file reading. Cmath is here for the round function which is used for the index calculation. Finally, cctype is used for its toupper function to use in the checkvowel method.
calcIndex()
The purpose of this method is to calculate the amount of syllables, sentences, and words in a string of text. It doesn't take any parameters because we assume that text is already entered via other methods or with the constructor.

Going over the variables we created here: tempSyl will be used to count the syllables in a word as our rules for counting syllables pertain to how they appear in a word. wordHolder will be where we put the words that we isolate to run through them and count their syllables. The string stream is used for collecting the individual letters and then putting them into wordHolder. Next, we set all the counters to 0 because we are analyzing the text again, so we don't want previous run throughs effecting it.
The first for loop goes through every character in the text and the total sentences, syllables, and words are counted within it. We want to go word by word, so we cut off the first if statement when it finds a space. When it hits the space, first we reset the string stream after putting it into wordHolder. Next, we check if there's a sentence ender in the word such as a period or and exclaimation mark. I went with . : ; ? and ! because that is what the project called for. If it detected those characters, we would increase the amount of sentences by one.
Next we add the null character ('\0') to the wordHolder to indicate where the end of the word was. Usually you only do this for C-Strings, but I found use in doing it here too. After that, we start counting syllables and words in the next for loop that runs through just the word. We are using some basic syllable counting rules so there's really only three logic rules:

1. Two or more vowels next to each other only count as one vowel.
2. If the last character of a word is e, it is not a vowel.
3. A word with no vowels has one syllable.
After the program checks for those vowel rules and adds the syllables, it checks if the word had no vowels. In that case, it would automatically give the word one syllable because words without syllables don't exist. Next, wordHolder and tempSyl are reset to get ready for the next word. If the program runs through the string and never reaches a punctuation, the sentence count automatically increases to one.
At the bottom, we have the final calculation. It is formatted a bit weird because for submitting our programs, we are limited to only 80 lines, so I had to do it like this. It's somewhat intuitive, just think of there being a bar under the long casted things. We cast sylCount, wordCount, and sentCount because we want the program to do double division first, then turn it into a non-floating point variable. If we don't static cast, it rounds way too early and ruins the whole calculation.

After the program checks for those vowel rules and adds the syllables, it checks if the word had no vowels. In that case, it would automatically give the word one syllable because words without syllables don't exist. Next, wordHolder and tempSyl are reset to get ready for the next word. If the program runs through the string and never reaches a punctuation, the sentence count automatically increases to one.